#ifndef FFMPEG_BYOPENSLES_FFMPEGMUSIC_H
#define FFMPEG_BYOPENSLES_FFMPEGMUSIC_H
#include<jni.h>
#include<string>
#include<android/log.h>

extern "C" {
#include<libavcodec/avcodec.h>
#include<libavformat/avformat.h>

typedef struct {
    AVCodecContext *avCodecContext;
    AVFormatContext *avFormatContext;
    int stream_index;
    int total_time;
} AudioInfo;


int createFFmpeg(JNIEnv *env, int *rate, int *channel, jstring filename);

void getPcm(void **pcm, size_t *pcm_size);

void releaseFFmpeg();

AudioInfo *getAudioInfo();

}
#endif //FFMPEG_BYOPENSLES_FFMPEGMUSIC_H
